package com.xps.and.yuntong.Ui;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.xps.and.yuntong.R;
import com.xps.and.yuntong.base.BaseActivity;

/**
 * Created by administrator on 2017-12-15.
 */

public class TixianActivity extends BaseActivity implements View.OnClickListener {

    private ImageView iv_fanhui,iv_right,iv_zhifubao_state, iv_weixin_state;
    private TextView tv_middle;
    private EditText et_jine;
    private LinearLayout ll_queren_tixian;

    private int state = 0;


    @Override
    protected int getLayout() {
        return R.layout.activity_tixian;
    }

    @Override
    protected void setData() {

    }

    @Override
    protected void init(Bundle inBundle) {
        initView();
    }


    private void initView() {
        iv_fanhui = (ImageView) findViewById(R.id.iv_fanhui);
        iv_right = (ImageView) findViewById(R.id.iv_right);
        iv_right.setVisibility(View.GONE);
        tv_middle = (TextView) findViewById(R.id.tv_middle);
        tv_middle.setText(R.string.ti_xian1);
        iv_zhifubao_state = (ImageView) findViewById(R.id.iv_zhifubao_state);
        iv_weixin_state = (ImageView) findViewById(R.id.iv_weixin_state);


        et_jine = (EditText) findViewById(R.id.et_jine);
        ll_queren_tixian = (LinearLayout) findViewById(R.id.ll_queren_tixian);


        iv_fanhui.setOnClickListener(this);
        iv_zhifubao_state.setOnClickListener(this);
        iv_weixin_state.setOnClickListener(this);
        ll_queren_tixian.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_fanhui:
                finish();
                break;

            case R.id.iv_zhifubao_state:
                state = 0;
                iv_zhifubao_state.setBackgroundResource(R.drawable.zhifu_yixuan);
                iv_weixin_state.setBackgroundResource(R.drawable.zhifu_weixuan);

                break;
            case R.id.iv_weixin_state:
                state = 1;
                iv_zhifubao_state.setBackgroundResource(R.drawable.zhifu_weixuan);
                iv_weixin_state.setBackgroundResource(R.drawable.zhifu_yixuan);
                break;
            case R.id.ll_queren_tixian:
                //此处跳转到支付宝或者微信支付界面
                finish();
                break;

        }

    }

}
